<?php

namespace app\model;

use think\Model;

class Admin extends Model
{
    public function getAvatarAttr($value, $data)
    {
        $_module = request()->module();
        if($_module == 'api'){
            $host = request()->domain();
            return $host.$value;

        }else{
            return $value;
        }
    }
}
